﻿namespace DumpsterDoggy.Domain.Shipping.Calculators
{
    public class OvernightShippingCalculator : IShippingCalculator
    {
        #region IShippingCalculator Members

        public bool IsValidFor(IShippable shippable)
        {
            return (shippable.Address.Country == "USA") && !shippable.ContainsHazardousMaterials();
        }

        public decimal CalculateCharge(IShippable shippable)
        {
            return 49.99m + (0.15m*shippable.SubTotal());
        }

        public string GetName()
        {
            return GetType().Name;
        }

        #endregion
    }
}